Terrain Settings
https://docs.unity3d.com/ja/2019.3/Manual/terrain-OtherSettings.html
設定をちゃんとしないと一瞬で激重になる
https://moon-bear.com/2019/12/02/faster-terrain/
このブログを参考にしつつ重区ならない程度にガッツリ削る必要がある
Basic Settings
Draw Instance
Unity 2018.3 で追加された
https://blogs.unity3d.com/jp/2018/10/10/2018-3-terrain-update-getting-started/
パフォーマンスの面では、GPU インスタンシングが実装されたレンダリングパスを地形作成システム用に追加しました。ほとんどの場合は、インスタンシングにより、発行されるドローコールの数が劇的に減少します。Unity が行ったテストの多くでは、CPU コストが 50% 以上削減されることがわかりました(ただし、当然ながら実際の数値はプラットフォームやユースケースに応じて異なります)。この新しいレンダリングパスを選択するには、「Terrain Settings」で「Draw Instanced」を有効にします。
なるほど?
Pixel Error
ハイトマップ、テクスチャなどの Terrain マップと生成された Terrain との間のマッピングの精度です。値が大きいほど精度は低くなりますが、レンダリングのオーバーヘッドは減少します。
グッと軽くなる。 25 ~ 100 を目安に大きくする
Base Map Dist
Terrain のテクスチャを最高解像度で表示する最大距離です。処理効率のため、この距離を越えると低い解像度の合成画像が使用されます。
小さくすると軽くなるが見た目が露骨に安くなる。
Cast Shadows
Terrainがフラットなら不要だが、普通に考えると使う
Enlighten and Progressive Lightmapper do not support two-sided shadows.
two-sided は使わなさそう
Reflection probes
Build in Standard or 対応しているカスタムマテリアル
Material
シェーダの指定は多分ここのはず。。。
Tree and Detail Objects
Bake Light Probes For Trees
If you check this box, Unity creates internal Light Probes at the position of each tree, and applies them to tree renderers for lighting. These probes are internal, and don’t affect other renderers in the Scene.
If you don’t check this box, trees are still affected by Light Probe Groups. This option is only effective for trees with Light Probe enabled on their prototype Prefab.
ツリーごとにLight ProbeがBakeされるようになる(Global Ilumination)
他には影響しない
どっちがいいんだろうか・・・
Remove Light Probe Ringing
Tree の probe のRigがじゃまくせぇから消す、というやつっぽい
https://docs.unity3d.com/ja/2019.3/Manual/class-LightProbeGroup.html#Ringing
Preserve Tree Prototype Layers
TerrainのGameObjectがもつLayer と tree の prefab がもつLayerどっち使うか
Detail Distance
The distance from the camera beyond which details are culled.
https://gyazo.com/b2489f40fdbc9d26b82f91257a137aad
Detail Density
Set this value lower to reduce rendering overhead.
https://gyazo.com/b14854afffd4bb86fc0f5ed9fca87623
Tree Distance
ちいさくすると軽くなりそう
Billboard Start
The distance from the camera at which Billboard images replace 3D Tree objects.
多分だけど、3D から 2D ヘの切り替え距離
ちいさくすると軽くなりそう
Fade Length
The distance over which Trees transition between 3D objects and Billboards.
上と同じでは???
Max Mesh Trees
The maximum number of visible Trees that are represented as solid 3D meshes. Beyond this limit, Billboards replace Trees.
Wind
割愛
Mesh Resolution
大事そう
Detail Resolution Per Patch
The number of cells in a single patch (mesh). This value is squared to form a grid of cells, and must be a divisor of the detail resolution.
大きいと描画されるDetailの数(?)に制限がかかり、小さすぎるとたくさん描画できて重い。
The combiend number of detail object vertices in one single patch is exceeding the limit.
という警告がでるようになる。
Detail Resolution
The number of cells available for placing details onto the Terrain tile. This value is squared to make a grid of cells.
少ないほど軽そう。cell って?
大きいと細かくなってる気がする。謎。
Holes Settings
Compress Holes Texture
ON にするとHolesをDXT1 graphics に圧縮するらしい。
Texture Resolutions
Heightmap Resolution
The pixel resolution of the Terrain’s heightmap. This value must be a power of two plus one, for example, 513, which is 512 + 1.
Control Texture Resolution
The resolution of the splatmap that controls the blending of the different Terrain Textures.
splatmap というのは、テクスチャの分布みたいなのを持ってるやつだと思われる。。。
Base Texture Resolution
The resolution of the composite Texture to use on the Terrain when you view it from a distance greater than the Basemap Distance.
謎。。。
Lighting
Global Ilumination
lightmap 焼いたり、他のオブジェクトに貢献するならこれ
Lightmapping
Scale in Lightmap
Lets you specify the relative size of an object’s UVs within a lightmap. If you set this to zero, the object is not lightmapped, but still contributes lighting to other objects in the Scene. A value greater than 1.0 increases the number of pixels (the lightmap resolution) used for this GameObject, while a value less than 1.0 decreases it.
焼かないなら0にする
Lightmap Parameters
https://docs.unity3d.com/ja/2019.3/Manual/class-LightmapParameters.html
Rendering Layer Mask
Determines which rendering layer this Terrain lives on. When you use a scriptable render pipeline, you can specify an additional rendering-specific layer mask. This filters the renderers based on the mask the renderer has and the mask passed to the DrawRenderers command.
謎。
Terrain Collider
Material
物理マテリアル(摩擦とか)はここ
Terrain Data
Enanble Tree Colliders
使う場合はここ(遠景なら不要っぽい)
#Terrain #Perfomance #Settings